
#ifndef _MODULESINTERFACE_H_
#define _MODULESINTERFACE_H_

typedef union
{
    struct {
        UInt32 Value;
    }Long;

    struct {
        UInt16 Array[2];
    }Short;

    struct {
        UInt8 Array[4];
    }Char;

    struct {
        void * p;
    }Point;
}stParam;

typedef void (*TfpCoreEvent)(stParam *pEventParam);
typedef void (*TfpCoreIntService)(void);
typedef unsigned char (*TfpModuleEvent)(UInt16 EventCode,stParam *pEventParam);

#define RET_EVENT_NEXT 1    //if an event handler return this value, that means pass the event to next handler.
#define RET_EVENT_STOP 0    //if an event handler return this value, that means pass the event has been finished.

typedef struct 
{
    TfpCoreIntService OnTickEvent;
    TfpModuleEvent ModuleEventHandler;
}stModuleInterface;


extern const stModuleInterface * const gModuleInterface[];

#endif /* _MODULESINTERFACE_H_ */
